/**
 * @author[wengcj]
 * @version[创建日期，2021/11/4 9:30]
 * @function[功能简介 ]
 **/
package com.example.iocdemo;

import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import androidx.annotation.Nullable;

public class MainActivity extends BaseActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        setContentView(R.layout.activity_main);
        super.onCreate(savedInstanceState);
        View view = new View(this);
        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
        view.setOnLongClickListener(new View.OnLongClickListener() {
            @Override
            public boolean onLongClick(View v) {
                return false;
            }
        });

    }


    @OnClick(R.id.btn)
    public void start(View view) {
        Toast.makeText(this,"我被点击了",Toast.LENGTH_SHORT).show();
    }

    @OnLongClick(R.id.longbtn)
    public boolean startLongClick(View view) {
        Toast.makeText(this,"我被长按了",Toast.LENGTH_SHORT).show();
        return true;
    }

}
